package com.ayf.payment.game.api.service.platform.impl;

import com.ayf.payment.game.api.dto.platform.AdminRoleMenuDTO;
import com.ayf.payment.game.api.entity.platform.AdminRole;
import com.ayf.payment.game.api.mapper.platform.AdminPermissionMapper;
import com.ayf.payment.game.api.service.platform.AdminPermissionService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class AdminPermissionServiceImpl implements AdminPermissionService {

    @Resource
    private AdminPermissionMapper adminPermissionMapper;

    @Override
    public List<AdminRoleMenuDTO> selectRoleMenuTree(AdminRole adminRole) {
        List<AdminRoleMenuDTO> list=adminPermissionMapper.selectRoleMenuTree(adminRole.getId());
        return list;
    }

    @Override
    public List<AdminRoleMenuDTO> selectMenuTree() {
        List<AdminRoleMenuDTO> list=adminPermissionMapper.selectMenuTree();
        return list;
    }
}
